//
//  UtilsMacro.h
//  Yuyuyanke
//
//  Created by 吴郑柯 on 16/3/10.
//  Copyright © 2016年 zhengkeWu. All rights reserved.
//

#ifndef UtilsMacro_h
#define UtilsMacro_h

//域名
#define DOMAIN_NAME  @"http://user.yunshang.megole.com/api" //测试

//手机型号
#define iPhone5         ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 1136), [[UIScreen mainScreen] currentMode].size) : NO)

#define iPhone4			([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 960), [[UIScreen mainScreen] currentMode].size) : NO)

#define IS_IPHONE_6 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(750, 1334), [[UIScreen mainScreen] currentMode].size) : NO)

//屏幕比例
#define SCREEN_H_RADIO   (SCREEN_WIDTH/375)     //水平比例
#define SCREEN_V_RADIO   (SCREEN_HEIGHT/667)     //垂直比例

//屏幕宽高
#define SCREEN_HEIGHT              ([[UIScreen mainScreen] bounds].size.height) //屏幕高度
#define SCREEN_WIDTH               ([[UIScreen mainScreen] bounds].size.width)  //屏幕宽度

//判断字符串是否为空
#define NULL_STR(str)   (str == nil || (NSNull *)str == [NSNull null] || str.length == 0)

//系统判定
#define IAIOS8 ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0)       //是否8.0以上

//按钮设置

#define BUTTON_CORNER_RADIUS   4.0               //圆角
#define BUTTON_SELECT_ALPHA    0.5              //选中状态透明度

//userDefault 字段宏定义

#define USER_TOKEN   ([[NSUserDefaults standardUserDefaults] objectForKey:@"user_token"])


//通知字段
#define UPDATE_USERINFO  @"update_userInfo"
#define UPDATE_CARTINFO  @"update_cartInfo"
#define kUnreadIMMsgCount @"unreadIMMsgcount"

//标题栏高度
static const CGFloat BAR_HIGHT = 64;

#endif /* UtilsMacro_h */
